package com.junit;

import org.junit.jupiter.api.Test;

import java.lang.annotation.Annotation;

public class AnnotationTest {
    @Test
    public void test(){
        Class class1 = Demo.class;
        Annotation[] annotations = class1.getDeclaredAnnotations();
        if(class1.isAnnotationPresent(Mytest4.class)){
            Mytest4 mytest4 = (Mytest4) class1.getDeclaredAnnotation(Mytest4.class);
            String name = mytest4.value();
            System.out.println(mytest4.value());
            mytest4.aaa();
            mytest4.bbb();
        }
    }
}
